<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <title>新增</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/js/commons/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/commons/base.css" media="all">
</head>
<body>
    <form id="dataForm" name="dataForm" lay-filter="dataForm" class="layui-form layui-form-pane" style="padding: 15px 15px">
        <div class="layui-form-item">
            <label class="layui-form-label required">标题</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required" id="title" name="title" autocomplete="off">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">链接地址</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required|url" id="linkUrl" name="linkUrl" autocomplete="off">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="number" class="layui-input" id="sortNum" name="sortNum" autocomplete="off" value="1" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
            </div>
        </div>
        <input type="hidden" id="imageUrl" name="imageUrl" lay-verify="required" lay-reqText="请上传图片"/>
        <div class="layui-form-item">
            <div class="layui-upload">
                <button type="button" class="layui-btn layui-btn-danger" id="bannerUpload">上传图片</button>
                <div class="layui-upload-list">
                    <img class="layui-upload-img" style="width: 300px;height: 200px" id="showUrl">
                    <p id="demoText"></p>
                </div>
            </div>
        </div>
        <button type="button" class="layui-btn" lay-filter="submitBtn" style="display:none;" lay-submit="" id="submitBtn" name="submitBtn">保存</button>
    </form>
</body>
</html>
<script charset="utf-8" src="/js/commons/jquery.js"></script>
<script charset="utf-8" src="/js/commons/layui/layui.all.js" ></script>
<script src="/js/mng/banner/banner_add.js"></script>